package hsh.shell;

import hsh.command.Command;
import hsh.command.WashClothesCommand;
import hsh.kernel.OperatingSystemKernel;

import java.util.Hashtable;
import java.util.Scanner;

public class Shell implements Runnable{

	
	
	private Hashtable<String, Command> commands;

	
	public Shell(OperatingSystemKernel kernel) {
		
	
		this.commands = new Hashtable<String, Command>();
		//this.commands.put("washcl", new WashClothesCommand(kernel.getScheduler()));
		
	}
	
	 
	public void run() {
		
		Scanner scanner = new Scanner(System.in);
		
		while(true){
		
		 System.out.println("--> ");
		 String nameCommand = scanner.nextLine();
		 Command command = this.commands.get(nameCommand);
		 command.execute();
		 
		 
		}
		
		
		
	}

}
